const $http = window.$http;

// 修改头像
export function updateAvatar(data) {
  return $http.request({
    url: "/ucenter/userTenant/updateUser",
    method: "put",
    data,
  });
}

// 修改密码
export function updataPassword(data) {
  return $http.request({
    url: "'/ucenter/user/updatePW'",
    method: "POST",
    data,
  });
}

// 上传头像
export function uploadAvatar(data) {
  return $http.request({
    url: '/oss/uploadFile/sturgeon',
    method: "POST",
    transformRequest: [
      function (data, headers) {
        delete headers.post['Content-Type']
        return data;
      },
    ],
    data,
  });
}
